home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
vector.lha
/
vector
/
vector_names.h
< prev
Wrap
C/C++ Source or Header
|
1991-11-23
|
790b
|
29 lines
#ifndef _VECTOR_NAMES_H
#define _VECTOR_NAMES_H
#include <generic.h>
// Conversions between degrees and radians
inline float dtor(float deg) {
return deg * M_PI / 180.0;
}
inline float rtod(float rad) {
return rad * 180.0 / M_PI;
}
// Pointer to error handler method for a class
typedef void (*errorHandler)(int, const char *);
// Names of matrix/vector types parameterized with the preprocessor (ick)
#define CVec(T) name2(T,CVec) /* Cartesian vector of type T */
#define HVec(T) name2(T,HVec) /* Homogenous vector of type T */
#define CMat(T) name2(T,CMat) /* Cartesian (affine) matrix of type T */
#define CMatType(T) name2(T,CMatType)
#define HMat(T) name2(T,HMat) /* Homogenous (4x4) matrix of type T */
#define HMatType(T) name2(T,HMatType)
#endif /*_VECTOR_NAMES_H*/